package com.sunagy.demand.backend.service;

import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;

import java.util.HashMap;

/**
 * desc：#TODO fill me ！
 * author：三餘無夢生
 * date：2018/4/27
 * time：下午2:02
 */
public interface SmsService {
    /**
     * 异步发送短信
     * @param phoneNumber
     * @param tplNumber
     * @param attributes
     * @return
     */
    SendSmsResponse send(String phoneNumber, String tplNumber, HashMap<String, String> attributes);

    /**
     * 同步发送短信
     * @param phoneNumber
     * @param tplNumber
     * @param attributes
     * @return
     */
    SendSmsResponse sendSync(String phoneNumber, String tplNumber, HashMap<String, String> attributes);

    /**
     * 发送短信验证码
     * @param phoneNumber
     * @param tplNumber
     * @param attributes
     * @param verifyCode
     * @return
     */
    SendSmsResponse send(String phoneNumber, String tplNumber, HashMap<String, String> attributes, String verifyCode);

    /**
     * 验证码校验
     * @param phone
     * @return
     */
    Boolean check(String phone, String verifyCode);
}
